<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
  <title>Title</title>
  <base href="<%=basePath%>"/>
  <%@include file="/WEB-INF/views/common/common.jsp" %>
  <script type="text/javascript" src="static/js/model/user.js"></script>

</head>
<body>
<%--datagrid--%>
<table id="userDatagrid"></table>
<%--用户数据表格工具栏--%>
<div id="userDatagridToolbar">
  <a data-cmd="userAdd" href="javascript:;" class="easyui-linkbutton "
     data-options="iconCls:'icon-add',plain:true">添加</a>
  <a data-cmd="userEdit" href="javascript:;" class="easyui-linkbutton "
     data-options="iconCls:'icon-edit',plain:true">修改</a>
  <a data-cmd="userDelete" href="javascript:;" class="easyui-linkbutton "
     data-options="iconCls:'icon-remove',plain:true">删除</a>
  <a data-cmd="userRefresh" href="javascript:;" class="easyui-linkbutton "
     data-options="iconCls:'icon-reload',plain:true">刷新</a>
  <a data-cmd="userChange" href="javascript:;" class="easyui-linkbutton "
     data-options="iconCls:'icon-reload',plain:true">禁用/启用</a>
  <a data-cmd="userReset" href="javascript:;" class="easyui-linkbutton " data-options="iconCls:'icon-no',plain:true">重置密码</a>
</div>
<%--用户添加修改模态框--%>
<div id="userDialog">
  <form id="userDialogForm">
    <input type="hidden" name="id" id="id">
    <input type="hidden" name="forbidden">
    <table>
      <tr>
        <td>名称</td>
        <td>
          <input name="name" class="easyui-testbox" required="true" style="width:200px">
        </td>
      </tr>
      <tr>
        <td>密码</td>
        <td>
          <input id="password" name="password" validType="length[4,32]"
                 class="easyui-validatebox" required="true" type="password" value=""/>
        </td>
      </tr>
    </table>
  </form>
  <table>
    <tr>
      <%--已选角色datagrid--%>
      <td>
        <table id="selectRoleDatagrid"></table>
      </td>
      <%--所有角色datagrid--%>
      <td>
        <table id="allRoleDatagrid"></table>
      </td>
    </tr>
  </table>
</div>
<%--用户添加对话框工具栏--%>
<div id="userDialogToolbar">
  <a data-cmd="userSave" href="javascript:;" class="easyui-linkbutton "
     data-options="iconCls:'icon-save',plain:true">保存</a>
  <a data-cmd="userCancel" href="javascript:;" class="easyui-linkbutton "
     data-options="iconCls:'icon-cancel',plain:true">取消</a>
</div>

<%--用户添加修改表单工具栏 --%>
<div id="userResetDialog">
  <form id="userResetDialogForm">
    <input type="hidden" name="id">
    <table>
      <tr>
        <td>重置密码</td>
      </tr>
      <tr>
        <td>
          密码 ：<input id="password1" name="password1" validType="length[4,32]" class="easyui-validatebox" required="true"
                     type="password" value=""/><br/>
        </td>
      </tr>
      <tr>
        <td>
          确认密码：<input type="password" name="repassword" id="repassword" required="true" class="easyui-validatebox"
                      validType="equalTo['#password1']" invalidMessage="两次输入密码不匹配"/>
        </td>
      </tr>


    </table>
  </form>
</div>
<%--用户重置密码工具栏--%>
<div id="userResetDialogToolbar">
  <a data-cmd="userResetSave">保存</a>
  <a data-cmd="userResetCancel">取消</a>
</div>



</body>
</html>
